package string;

import java.util.Arrays;

public class StartWithDemo {
    public static void main(String[] args) {
        String line = "www.tedu.cn";

        boolean starts = line.startsWith("www");
        System.out.println("starts = " + starts);
        starts = line.startsWith("WWW");
        System.out.println("starts = " + starts);

        boolean ends = line.endsWith(".com");
        System.out.println("ends = " + ends);
        ends = line.endsWith(".cn");
        System.out.println("ends = " + ends);
    }
}
